Scene Management API
Get Scene List
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| scene_id | String | Body | Scene ID |
| scene_name | String | Body | Scene name |
| is_auto | Boolean | Body | Whether the scene is automation or not? true: yes false: no |
| enable_auto | Boolean | Body | Whether the scene automation is enable or not? true: enable false: disable |
| manual | Boolean | Body | Whether the scene is manual or not? true: yes false: no |
| scene_entity_id | String | Body | Scene entity ID |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_scene_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db",
"scene_name": "my scene",
"is_auto": true,
"enable_auto": true,
"manual": true,
"scene_entity_id": "es8b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
Failure Return Example
Get Scene Information
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| scene_id | String | Body | Yes | Scene ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| scene_name | String | Body | Scene name |
| is_auto | Boolean | Body | Whether the scene is automation or not? true: yes false: no |
| manual | Boolean | Body | Whether the scene is manual or not? true: yes false: no |
| scene_entity_id | String | Body | Scene entity ID |
| triggers | []Object<trigger> | Body | Trigger information |
| conditions | []Object<condition> | Body | Condition information |
| actions | []Object<action> | Body | Action information |
trigger description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| trigger_config | String | Body | Trigger config, see Scene Trigger Config |
| device_id | String | Body | Device ID |
| ability_id | String | Body | Ability ID |
| ability_type | String | Body | Ability type |
| trigger_type | String | Body | Trigger type, see Scene Trigger Config |
| attribute | Object | Body | Attribute, see Standard Device Model |
condition description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| condition_config | String | Body | Condition config, see Scene Condition Config |
| device_id | String | Body | Device ID |
| ability_id | String | Body | Ability ID |
| ability_type | String | Body | Ability type |
| condition_type | String | Body | Condition type, see Scene Condition Config |
| attribute | Object | Body | Attribute, see Standard Device Model |
action description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| action_config | String | Body | Action config, see Scene Action Config |
| device_id | String | Body | Device ID |
| ability_id | String | Body | Ability ID |
| ability_type | String | Body | Ability type |
| action_type | String | Body | Action type, see Scene Action Config |
| attribute | Object | Body | Attribute, see Standard Device Model |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"scene_name": "my scene",
"is_auto": true,
"manual": true,
"scene_entity_id": "es8b5a73f8dd84abaa94dcs248be49b0d2",
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea1",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec1",
"ability_type": "switch",
"trigger_type": "turned_on"
}
],
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea2",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec2",
"ability_type": "switch",
"condition_type": "is_on"
}
],
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea3",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec3",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
]
}
Failure Return Example
Get Device Trigger List
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| device_id | String | Body | No | Device ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| device_name | String | Body | Device name |
| device_type | String | Body | Device type |
| device_id | String | Body | Device ID |
| triggers | []Object<trigger> | Body | Trigger information |
trigger description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| trigger_config | String | Body | Trigger config, see Scene Trigger Config |
| device_id | String | Body | Device ID |
| ability_id | String | Body | Ability ID |
| ability_type | String | Body | Ability type |
| trigger_type | String | Body | Trigger type, see Scene Trigger Config |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_trigger_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_name": "My Device",
"device_type": "Switch",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec7",
"ability_type": "switch",
"trigger_type": "turned_on"
}
]
}
]
}
Failure Return Example
Get Device Condition List
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| device_id | String | Body | No | Device ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| device_name | String | Body | Device name |
| device_type | String | Body | Device type |
| device_id | String | Body | Device ID |
| conditions | []Object<condition> | Body | Condition information |
condition description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| condition_config | String | Body | Condition config, see Scene Condition Config |
| device_id | String | Body | Device ID |
| ability_id | String | Body | Ability ID |
| ability_type | String | Body | Ability type |
| condition_type | String | Body | Condition type, see Scene Condition Config |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_condition_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_name": "My Device",
"device_type": "Switch",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec7",
"ability_type": "switch",
"condition_type": "is_on"
}
]
}
]
}
Failure Return Example
Get Device Action List
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| device_id | String | Body | No | Device ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| device_name | String | Body | Device name |
| device_type | String | Body | Device type |
| device_id | String | Body | Device ID |
| actions | []Object<action> | Body | Action information |
action description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| action_config | String | Body | Action config, see Scene Action Config |
| device_id | String | Body | Device ID |
| ability_id | String | Body | Ability ID |
| ability_type | String | Body | Ability type |
| action_type | String | Body | Action type, see Scene Action Config |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_action_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_name": "My Device",
"device_type": "Switch",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aeaf",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec7",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
]
}
Failure Return Example
Create Scene Information
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| scene_name | String | Body | Yes | Scene name |
| manual | Boolean | Body | Yes | Whether the scene is manual or not? true: yes false: no |
| triggers | []Object<trigger> | Body | Yes | Trigger information |
| conditions | []Object<condition> | Body | Yes | Condition information |
| actions | []Object<action> | Body | Yes | Action information |
trigger description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| trigger_config | String | Body | Yes | Trigger config, see Scene Trigger Config |
| device_id | String | Body | No | Device ID |
| ability_id | String | Body | No | Ability ID |
| ability_type | String | Body | No | Ability type |
| trigger_type | String | Body | No | Trigger type, see Scene Trigger Config |
| attribute | Object | Body | No | Attribute, see Standard Device Model |
condition description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| condition_config | String | Body | Yes | Condition config, see Scene Condition Config |
| device_id | String | Body | No | Device ID |
| ability_id | String | Body | No | Ability ID |
| ability_type | String | Body | No | Ability type |
| condition_type | String | Body | No | Condition type, see Scene Condition Config |
| attribute | Object | Body | No | Attribute, see Standard Device Model |
action description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| action_config | String | Body | Yes | Action config, see Scene Action Config |
| device_id | String | Body | No | Device ID |
| ability_id | String | Body | No | Ability ID |
| ability_type | String | Body | No | Ability type |
| action_type | String | Body | No | Action type, see Scene Action Config |
| attribute | Object | Body | No | Attribute, see Standard Device Model |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_name": "test",
"manual": true,
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea1",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec1",
"ability_type": "switch",
"trigger_type": "turned_on"
}
],
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea2",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec2",
"ability_type": "switch",
"condition_type": "is_on"
}
],
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea3",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec3",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Update Scene Information
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| scene_id | String | Body | Yes | Scene ID |
| scene_name | String | Body | Yes | Scene name |
| manual | Boolean | Body | Yes | Whether the scene is manual or not? true: yes false: no |
| triggers | []Object<trigger> | Body | Yes | Trigger information |
| conditions | []Object<condition> | Body | Yes | Condition information |
| actions | []Object<action> | Body | Yes | Action information |
trigger description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| trigger_config | String | Body | Yes | Trigger config, see Scene Trigger Config |
| device_id | String | Body | No | Device ID |
| ability_id | String | Body | No | Ability ID |
| ability_type | String | Body | No | Ability type |
| trigger_type | String | Body | No | Trigger type, see Scene Trigger Config |
| attribute | Object | Body | No | Attribute, see Standard Device Model |
condition description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| condition_config | String | Body | Yes | Condition config, see Scene Condition Config |
| device_id | String | Body | No | Device ID |
| ability_id | String | Body | No | Ability ID |
| ability_type | String | Body | No | Ability type |
| condition_type | String | Body | No | Condition type, see Scene Condition Config |
| attribute | Object | Body | No | Attribute, see Standard Device Model |
action description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| action_config | String | Body | Yes | Action config, see Scene Action Config |
| device_id | String | Body | No | Device ID |
| ability_id | String | Body | No | Ability ID |
| ability_type | String | Body | No | Ability type |
| action_type | String | Body | No | Action type, see Scene Action Config |
| attribute | Object | Body | No | Attribute, see Standard Device Model |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_id": "sr31adc223cc4b3bedb6bd4742dedcfa5",
"manual": true,
"scene_name": "test",
"triggers": [
{
"trigger_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea1",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec1",
"ability_type": "switch",
"trigger_type": "turned_on"
}
],
"conditions": [
{
"condition_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea2",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec2",
"ability_type": "switch",
"condition_type": "is_on"
}
],
"actions": [
{
"action_config": "device",
"device_id": "da59adf952f19dc69b82868e9c4f6aea3",
"ability_id": "ec2dab6d92b8755a9f59b5611f0fa1ec3",
"ability_type": "switch",
"action_type": "turn_on"
}
]
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Delete Scene Information
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| scene_id | String | Body | Yes | Scene ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Batch Delete Scene Information
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| scenes | []Object<scene> | Body | Yes | Scene information |
scene description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_id | String | Body | Yes | Scene ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_scene_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"scenes": [
{
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db"
}
]
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Manual Trigger Scene
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_entity_id | String | Body | Yes | Scene entity ID |
| residence_id | String | Body | Yes | Residence ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "manual_trigger_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Batch Manual Trigger Scene
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scenes | []Object<scene> | Body | Yes | Scene information |
| residence_id | String | Body | Yes | Residence ID |
scene description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_entity_id | String | Body | Yes | Scene entity ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_manual_trigger_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scenes": [
{
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Enable Automation Scene
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_entity_id | String | Body | Yes | Scene entity ID |
| residence_id | String | Body | Yes | Residence ID |
| enable_auto | Boolean | Body | Yes | Whether the automation is enable or not? true: enable false: disable |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "enable_auto_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"enable_auto": true
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Batch Enable Automation Scene
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| scenes | []Object<scene> | Body | Yes | Scene information |
scene description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_entity_id | String | Body | Yes | Scene entity ID |
| enable_auto | Boolean | Body | Yes | Whether the automation is enable or not? true: enable false: disable |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_enable_auto_scene",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scenes": [
{
"scene_entity_id": "e3b5a73f8dd84abaa94dcs248be49b0db",
"enable_auto": true
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Get Scene History
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| scene_id | String | Body | Yes | Scene ID |
| page_size | Integer | Body | Yes | Page size |
| page_index | Integer | Body | Yes | Page index |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | []Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| scene_record_id | String | Body | Scene record ID |
| scene_id | String | Body | Scene ID |
| scene_name | String | Body | Scene name |
| trigger_scene | Boolean | Body | Whether the scene triggering is successful or not? true: success false: failure |
| start_time | String | Body | Start time, UTC |
| finish_time | String | Body | Finish time, UTC |
| manual | Boolean | Body | Whether the scene triggering is manual or not? true: yes false: no |
| detail | Object<detail> | Body | Detail information |
detail description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| space_name | String | Body | Space name |
| space_id | String | Body | Space ID |
| device_name | String | Body | Device name |
| device_id | String | Body | Device ID |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_scene_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"scene_record_id": "r8b5a73f8dd84abaa94dcs248be49b0d1",
"scene_id": "s8b5a73f8dd84abaa94dcs248be49b0db",
"scene_name": "my scene",
"trigger_scene": true,
"start_time": "2024-01-16 13:32:43",
"finish_time": "2024-01-16 13:32:45",
"manual": false,
"detail": {
"space_name": "kitchen",
"space_id": "ss8b5a73f8dd84abaa94dcs248be49b0d",
"device_name": "co",
"device_id": "dr8b5a73f8dd84abaa94dcs248be49b0d"
}
}
]
}
Failure Return Example
Delete Scene History
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_record_id | String | Body | Yes | Scene record ID |
| residence_id | String | Body | Yes | Residence ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_scene_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_record_id": "r7b5a73f8dd84abaa94dcs248be49b5dh",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
Failure Return Example
Batch Delete Scene History
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_records | []Object<scene_record> | Body | Yes | Scene record information |
| residence_id | String | Body | Yes | Residence ID |
scene_record description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| scene_record_id | String | Body | Yes | Scene record ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_scene_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"scene_records": [
{
"scene_record_id": "r7b5a73f8dd84abaa94dcs248be49b5dh"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db"
}
}
Success Return Example
Status Code: 200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}